#!usr/bin/perl
use 5.012;
use utf8;
use warnings;


my $value1 = 3;
my $value2 = 5;

sub sumOf{
	my $result = $value1 + $value2;
	print "the result is $result";
	}
	
sub max{
	if(@_ != 2){
		print "\nerror: give exactly two arguments";
		}
	else{
		my ($m, $n) = @_;
		if ($m < $n){
			$n;
			}
		else { 
			$m;
		}
	}	
}

sub max2{
	my ($maxTemp) = shift @_;
	foreach(@_){
		if($maxTemp < $_){
			$maxTemp = $_;
			}
		}
	print "\nThe biggest element is $maxTemp";
	}
&sumOf;
print "\nthe biggest number is ",  &max(4,7, 10);
&max2(6,89,1,12);
